import request from '@/utils/request'

// 获取所有角色数据
export const getRoleList = () => {
  return request({
    url: 'v1/ruizy/roles/',
    method: 'get',
  })
}

// 获取角色下有权限的菜单
export const getRoleMenusAuth = (params) => {
  return request({
    url: 'v1/ruizy/roleMenus/',
    method: 'get',
    params
  })
}

// 角色添加菜单权限
export const setRoleMenu = (data) => {
  return request({
    url: 'v1/ruizy/roleMenu/',
    method: 'post',
    data
  })
}
